Skip to content

Bound repeated failure and eviction telemetry - #2148

Merged
Tyrie Vella (tyrielv) merged 3 commits into
microsoft:masterfrom
tyrielv:tyrielv/telemetry-storm-control
Nov 5, 2026
Merged

Tyrie Vella (tyrielv) merged 3 commits into
microsoft:masterfrom
tyrielv:tyrielv/telemetry-storm-control

Conversation

@tyrielv

@tyrielv Tyrie Vella (tyrielv) commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Problem and Context

An open circuit breaker rejects retry invocations locally, but each rejection can emit network-error telemetry. Hydration and size-enumeration layers emit additional errors for the same operation. Successful LRU evictions also emit one telemetry event per eviction.

These repeated events can exhaust telemetry capacity and obscure genuine HTTP failures. Error counts across these layers do not represent HTTP requests or unique failed hydrations.

Changes

  • Classify local breaker rejections with a dedicated exception. Annotate standard and custom handlers without changes to callbacks, retries, cancellation, or functional results.

  • Distinguish direct hydration-retrier rejection from companion errors. Direct rejections use Rejected; nested-download and virtualizer companions use Failed.

  • Bound known repetitive events at the telemetry daemon listener. Keep one diagnostic sample per key per interval, with at most 64 keys and a separate overflow counter.

  • Emit TelemetrySummary events with observed, sampled, suppressed, and overflow counts. Use 60-second intervals that flush on subsequent traffic, plus a disposal flush. Idle periods can delay summaries.

  • Use TelemetrySchemaVersion=3 and AggregationResult for the aggregation outcome. Preserve legacy result fields and HRESULT values without case-only JSON key collisions.

  • Exclude SHA, paths, request IDs, command IDs, and exception text from aggregation keys. Forward unfamiliar errors and actual HTTP/authentication retry failures unchanged.

  • Omit gitCommandSessionId from cross-command summaries. Preserve command context on individual samples.

  • Retain every repeated error in direct local logs. Downstream ETW consumers receive the bounded pipe stream, not the suppressed raw events.

  • Report observed breaker states without changes to thresholds or probes. Require a recorded cooldown expiry before a CooldownElapsed observation, and skip inconsistent snapshots.

  • Group breaker samples by PreviousState and destination AggregationResult. Add LastObservedAtUtc to summaries without changes to retry decisions.

  • Batch eviction diagnostics outside cache locks. Keep successful removals and failed eviction attempts in separate counters.

  • Add unit tests for concurrent counters, key dimensions, overflow, wire fields, first-observation timestamps, and weighted eviction outcomes. The eviction test verifies its representative snapshot and cross-thread cache access during telemetry.

  • Add unit tests for direct and companion classifications, failure-triggered breaker states, requestor tracer propagation, and missing child sizes. These tests verify unchanged cancellation, failure callbacks, and command completion.

  • Add unit tests that reconnect a real pipe and verify shared child-tracer limits and complete local diagnostics. A disposal test verifies summary delivery and legacy HRESULT preservation.

  • Add unit tests that switch command sessions and separate initial Accepting from subsequent recovery. These tests verify bounded repeated transitions and latest timestamps.

Summary counters describe per-layer observations, not unique failures. ObservedCount already includes the diagnostic samples. Transition summaries retain their latest receipt timestamp, not a complete ordered history or proof of service-wide recovery.

Known gaps and deliberate decisions

  • Consumer prerequisites — Release scorecards and error-rate queries must use observation counts from samples and summaries before producer rollout. Raw-row comparisons can understate candidate failures.
  • Local eviction diagnostics — Each mutation retains one representative eviction snapshot and its exact count. Local logs omit later evicted commit identifiers.
  • Low-volume telemetry — An annotated observation emits a sample and a summary, even if no duplicate occurs. Each traced process also reports its initial breaker state.
  • Capacity overflow — Known annotated groups that exceed capacity contribute exact overflow counts without individual samples. Unknown unannotated errors retain their full diagnostics.

Keep diagnostic samples and exact per-layer observation counts on the
telemetry pipe. Preserve direct local error logs and retry behavior.
Distinguish direct breaker rejections from companion errors.
Use AggregationResult without changes to legacy HRESULT fields.

Add regression tests for counter keys, disposal delivery, cache-lock
boundaries, breaker-state observations, and requestor annotations.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Assisted-by: GPT-6.1 Sol
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
@tyrielv
Tyrie Vella (tyrielv) force-pushed the tyrielv/telemetry-storm-control branch from 35305e0 to 1c62255 Compare November 5, 2026 19:27
Preserve the hydration-summary pipe tests and the telemetry aggregation
tests in the combined listener fixture.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Assisted-by: GPT-6.1 Sol
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
@tyrielv
Tyrie Vella (tyrielv) marked this pull request as ready for review November 5, 2026 19:52
@KeithIsSleeping

Copy link
Copy Markdown

[KeithBot]: ⚠️ 1 issue · iteration 3 (a7e5329)

  1. 🟡 Medium Breaker recovery sample is suppressed when Accepting was already sampled

Validation

  • ❌ Summary session attribution repro
  • ❌ Breaker recovery repro, prod defaults
  • ✅ Full GVFS.UnitTests at head and base
  • ✅ Changed fixtures, 8 repeated runs
  • ✅ CommandLine.Tests 94/94; other builds
  • ✅ Real-pipe rejection storm bounding
  • ✅ Culture/replay/eviction edge cases
  • ⏭️ FunctionalTests (ProjFS, service) — not run

Also confirmed (raised by others, reproduced by us): T4485934340 (ShiningMassXAcc)

🤖 KeithBot · claude-opus-5.5, gpt-6.1-sol, gemini-4-argon · reply on a thread to dispute

Omit command-session context from cross-command summaries.
Keep breaker samples separate by previous and destination state.
Record the latest observation timestamp in summary counters.

Add real-pipe tests for command changes, recovery samples, and
bounded repeated transitions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Assisted-by: GPT-6.1 Sol
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
@KeithIsSleeping

Copy link
Copy Markdown

[KeithBot]: ✅ Resolved · iteration 4 (cf1fca6)

  • Breaker recovery sample is suppressed when Accepting was already sampled: fixed
  • New changes since iteration 3: no new issues

Validation

  • ✅ Breaker recovery repro, prod defaults
  • ✅ Summary session attribution repro
  • ✅ Full GVFS.UnitTests at head and base
  • ✅ PR overlaid on master af1cedf
  • ✅ Changed fixtures, repeated runs
  • ✅ Flapping, overflow, culture probes
  • ✅ Collector wire compatibility
  • ✅ Mount/Hooks builds, CommandLine.Tests
  • ⏭️ FunctionalTests (ProjFS, service) — not run

Approving.

🤖 KeithBot · claude-opus-5.5, gpt-6.1-sol, gemini-4-argon · reply on a thread to dispute

@tyrielv
Tyrie Vella (tyrielv) merged commit e90f6a2 into microsoft:master Nov 5, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants